package nl.hr.cmi.opleiding;

import nl.hr.cmi.opleiding.utils.animation.Flipper;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ViewFlipper;

public class Opleiding extends Activity {
	/** Called when the activity is first created. */

	ViewFlipper flipper;

	Button buttonLeft;
	Button buttonRight;
	//Button buttonOpleiding;
	//Button buttonOpleidingf;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.opleiding);

		flipper = (ViewFlipper) findViewById(R.id.flipper);

		buttonLeft = (Button) findViewById(R.id.left);
		buttonRight = (Button) findViewById(R.id.right);
		//buttonOpleiding = (Button) findViewById(R.id.opleiding);
		//buttonOpleidingf = (Button) findViewById(R.id.factsheet);

		buttonRight.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				flipper.setInAnimation(Flipper.inFromRightAnimation());
				flipper.setOutAnimation(Flipper.outToLeftAnimation());
				flipper.showPrevious();
			}
		});

		buttonLeft.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				flipper.setInAnimation(Flipper.inFromLeftAnimation());
				flipper.setOutAnimation(Flipper.outToRightAnimation());
				flipper.showNext();
			}
		});

//		buttonOpleiding.setOnClickListener(new OnClickListener() {
//			@Override
//			public void onClick(View v) {
//				flipper.setInAnimation(Flipper.inFromLeftAnimation());
//				flipper.setOutAnimation(Flipper.outToRightAnimation());
//				flipper.setDisplayedChild(1);
//				flipper.showNext();
//			}
//		});
//		buttonOpleidingf.setOnClickListener(new OnClickListener() {
//			@Override
//			public void onClick(View v) {
//				flipper.setInAnimation(Flipper.inFromLeftAnimation());
//				flipper.setOutAnimation(Flipper.outToRightAnimation());
//				flipper.setDisplayedChild(0);
//				flipper.showNext();
//			}
//		});

	}

}